<%-- 
    Document   : listCenters
    Created on : 15 Nov, 2012, 7:26:40 PM
    Author     : sagar
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<%@include file="../common/script.jsp" %>

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <%@include file="../common/title.jsp" %>
    </head>
    <body>
        <%@include file="../common/header.jsp" %>
        <%@include file="../common/menu.jsp" %>
        <div class="in_02" >
            <%@include file="../common/message.jsp" %>
            <form id="form1" method="POST" action="listCenters.htm">
                <fieldset>
                    <legend>Select City</legend>
                    <table class="formTable">
                        <tr>
                            <td>City:<br/><select name="cityId" id="cityId" style="margin-bottom: 5px">
                                    <option value="0">-</option>
                                    <c:forEach items="${cityList}" var="cityItem">
                                        <option value="${cityItem.cityId}" <c:if test="${cityItem.cityId==dataMap.cityId}">selected</c:if>>${cityItem.cityName}</option>
                                    </c:forEach>
                                </select>
                            </td>
                            <td><input style="margin-top: 13px" type="submit" name="btnSubmit" class="userInputFormSubmit" value="<spring:message code="button.Go"/>"/></td>
                        </tr>
                    </table>
                </fieldset>
            </form>


            <form>
                <br/> &nbsp;&nbsp;&nbsp;
                <sec:authorize ifAnyGranted="ROLE_BF_CENTER_ADD">
                <span style="font-size: 15px; font-weight: bold;"><a href="../centers/addCenters.htm">Add Healthspring Community Medical Center</a></span>
                </sec:authorize>
                <br/><br/>
<h1><spring:message code="title.listHealthSpringCenters"/></h1><br/>
                <table class="data_table" border="1px">
                    <thead>
                        <tr class="header">
                            <td align="center"><spring:message code="centerName"/></td>                      
                            <td align="center"><spring:message code="address"/></td>
                            <td align="center"><spring:message code="phoneNumber"/></td>
                            <td align="center"><spring:message code="masterZoneCode"/></td>
                            <td align="center"><spring:message code="cityName"/></td>
                            <sec:authorize ifAnyGranted="ROLE_BF_CENTER_EDIT">
                            <th>&nbsp;</th>
                            </sec:authorize>
                        </tr>
                    </thead>
                    <c:forEach items="${dataMap.centerList}" var="centerItem">
                        <tr>
                            <td align="center"><c:out value="${centerItem.centerName}"/></td>                         
                            <td align="center"><c:out value="${centerItem.address}"/></td>
                            <td align="center"><c:out value="${centerItem.phoneNumber}"/></td>
                            <td align="center"><c:out value="${centerItem.masterZone.masterZoneCode}"/></td>
                            <td align="center"><c:out value="${centerItem.masterZone.cityId.cityName}"/></td>
                            <sec:authorize ifAnyGranted="ROLE_BF_CENTER_EDIT">
                                <td><a href="editCenters.htm?centerId=<c:out value="${centerItem.centerId}"/>"><img src="../images/edit.png"  width="20" height="20" style="border: none" alt="Edit" title="Edit"/></a></td>
                                    </sec:authorize>
                                </c:forEach>
                </table>
                &nbsp;&nbsp;&nbsp;&nbsp;<c:out value="${fn:length(dataMap.centerList)}"/> <spring:message code="rowsFound"/>
                <br/><br/> &nbsp;&nbsp;&nbsp;
                <sec:authorize ifAnyGranted="ROLE_BF_CENTER_ADD">
                <span style="font-size: 15px; font-weight: bold;"><a href="../centers/addCenters.htm">Add Healthspring Community Medical Center</a></span> 
                </sec:authorize>
            </form>
        </div>
    </body>
</html>

